home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload Trio 2
/
Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO
/
dir24
/
wxman10.zip
/
WXMAN.DOC
< prev
next >
Wrap
Text File
|
1994-06-10
|
28KB
|
657 lines
WeatherMan:
A Radiofacsimile Reception Program
for
IBM PCs and Compatibles
Table of Contents
(Find topics by searching for the topic title. Be sure to include the
brackets in the search string.)
[Notice]
[I]...........What Is Wefax?
[II]..........How WeatherMan Works
[III].........Connecting a Radio to a Sound Card
[IV]..........Creating a Configuration File
[V]...........Running WeatherMan
[VI]..........WeatherMan Keyboard Commands
[VII].........The SHOWPIC Program
[VIII]........The RAW2PCX Program
[IX]..........WXDEMO.EXE
[Appendix 1]..Weather Facsimile Frequencies
[Appendix 2]..Troubleshooting Q&A
[Appendix 3]..VOC Driver Files and Sound Cards
[Appendix 4]..About the Sample Pictures
[Notice]
*****
Notice, Part 1-- The Plea for Cold, Hard Cash:
The computer programs and documentation described in this document are
neither free, nor are they in the public domain: they are shareware.
In this particular case, the term "shareware" means that you are welcomed
and encouraged to use the programs for a trial period of not more than 30
days. If, after or during the trial period, you decide to continue
using the programs, you should send a check (drawn on a U.S. bank) or
a U.S. Postal Money Order in the amount of $20.00 (US currency) to the
program's author:
Paul Hitchcock
2309 Blake Street, #308
Berkeley, CA 94704
*****
Notice, Part 2-- WeaselSpeak, or The Ugly Legal Stuff:
The programs and documentation in this package are distributed "as-is",
with no warranty expressed or implied, including, but not limited to,
merchantability or fitness for a particular purpose. Any and all
damages arising out of the use of the programs and/or documentation
are the responsibility of the purchaser and/or user of the programs
and documentation.
All programs and documentation in this package are Copyright (C) 1994
by Paul Hitchcock
"Sound Blaster" is a registered trademark of Creative Labs, Inc.
"PAS 16", "ThunderBoard", and "ProAudio Spectrum" are registered
trademarks of Mediavision, Inc.
*****
[Introduction]
WeatherMan is a computer program for IBM PCs and compatibles which,
when used with a Sound Blaster-compatible sound card, lets you receive,
display, and store to disk weather photos and charts of the type
broadcast over the high-frequency (HF) shortwave bands.
To use the program you must have the following items:
1) A shortwave receiver, equipped with a beat-frequency
oscillator (BFO)
2) A 100% Sound Blaster-compatible sound card
3) A VGA video card and monitor capable of displaying
640x480 16-color graphics
4) An IBM PC or compatible 386/486 computer, running at
33 MHz or faster
5) A VOC file driver program (usually supplied with the
sound card). See Appendix 3 of this document.
6) A patch cord for connecting the shortwave receiver to the
sound card
[I] What Is Wefax?
Wefax, or weather facsimile, is the name for a process by which
photographs and other graphical material are distributed via radio.
At the transmitter, an object is scanned line-by-line at a constant
rate by an optical sensor; the output of the sensor is used to
control the frequency of an oscillator in such a way that the
oscillator's output is linearly proportional to the amount of light
refected from corresponding areas of the scanned object. The
frequency of the oscillator ranges from 1500 Hz for pure-black areas
to 2300 Hz for white regions. This "frequency-modulated subcarrier"
is then used to frequency-modulate a radio wave which is then
broadcast.
At the receiver the process is reversed: the wefax signal is
demodulated, resulting in a set of tones whose frequencies
are again linearly proportional to the light and dark areas of the
original scanned object. If an FM receiver is employed to detect
the signal, the original frequencies are faithfully reproduced.
More commonly, however, the signal is demodulated using an AM
receiver equipped with a beat-frequency oscillator (BFO). While
FM reception generally results in better noise rejection, the BFO
method gives the listener the ability to choose (within limits,
of course) the center frequency of the 800 Hz audio band; this
capability can be very useful when trying to receive a fax in
the presence of an interfering signal. BFO-based reception is
assumed throughout the remainder of the discussion.
For the purpose of this discussion, a wefax broadcast can be
defined by two parameters: (1) its transmission rate (or "drum
speed") in lines per minute (lpm) and (2) its index of correlation
(IOC). The IOC is essentially the ratio of the transmitted
picture's line width to its line height. At the present time,
nearly all U.S. (and many foreign) wefax broadcasts are transmitted
with a drum speed of 120 lpm and an IOC of 576. There are a number
of other radiofacsimile formats, but the present version of WeatherMan
can only receive faxes broadcast at 120 lpm.
A more complete description of weather facsimile broadcasting can
be found in the 1990 edition of the ARRL Handbook.
(Note: The term "wefax" is not really appropriate for describing
HF weather facsimile broadcasts, but since "everybody" uses it in
this context, I'll follow the same convention.)
[II] How WeatherMan Works
Sound Blaster-compatible sound cards are usually supplied with a
"VOC file driver" program which-- thanks to the miracle of
DMA-interrupts-- lets you play "VOC" files that have been loaded
into memory while your computer is running another completely
independent program. A basic VOC file is nothing more than a set
of numbers representing analog voltage levels that have been
sampled from, say, your soundcard's mic input.
Just as the VOC driver is capable of playing sounds in the
background, it's also able to record sounds as a background
task as well. WeatherMan uses this facility to record an incoming
line of fax material at the same time it's decoding and displaying
the last received line.
WeatherMan measures the time interval between consecutive zero-point
crossings of the recorded samples to calculate an average audio
frequency over a given number of samples. Once the frequency has
been determined, the program assigns a proportional color number
from 0 through 15 to the frequency, plots the point, then goes
back for more samples. This process continues until the program's
user takes some intervening action.
In it's current incarnation, WeatherMan samples the mic input at a
rate of 10,000 samples per second and uses, on average, 8 samples
per pixel. From these numbers, one would assume this would yield a
picture 625 pixels wide (5000 samples per half-second line divided
by 8). Unfortunately, it's not quite that simple: Due to variations
in the sampling rate of individual sound card/computer combinations
and due also to the need to start the next line in a timely fashion,
the actual width of the picture is 623 pixels. This means that two
pixels of every line are lost.
Now for the good news-- although two pixels per line are not plotted,
if the picture being received is properly aligned, no useful data is
lost. The nature of fax transmission requires that useful information
can't be transmitted over the entire line: for example, with a
mechanical fax receiver, time must be allowed for the pen or plotting
stylus to return to the margin to begin drawing the next line.
Now for the bad news-- compromises had to be made. In order for
WeatherMan to run on the greatest number of machines, I decided
that the screen resolution should be no greater than 640x480 in
16 colors. Unfortunately, since a vertical resolution of 480 pixels
would result in displaying only a small portion of a weather photo,
I also decided that the program would plot only one line for every
two received. Lines are not skipped, however: a smoothing algorithm
is used on every two received lines to produce a smooth-appearing
single line, which is then plotted. Using this method, about
two-thirds of a complete weather photo can be displayed on a
640/480 screen.
Now for the completely impartial(but interesting) news-- forget what
was said about white being the highest frequency and black being the
lowest. In commercial fax receivers, those conditions undoubtedly
obtain. However, I found that the best results were achieved when
receiving faxes on the other sideband; hence, WeatherMan employs a
reversed palette in which darker colors represent higher frequencies.
As will be seen later on, WeatherMan's configuration file can be
modified to comply with the "standard" if that's what you need.
[III] Connecting a Radio to a Sound Card
To use WeatherMan, you must connect the audio output of your radio
receiver to the microphone input of your sound card. But first:
*****************************************
* *
* Warning! Warning! Warning! *
* Warning! Warning! Warning! *
* Warning! Warning! Warning! *
* *
*****************************************
Got your attention? Good, because this is very important: unless
you completely understand what you are doing when you connect any
two pieces of electrical equipment together :
THERE IS AN INHERENT RISK OF PERMANENT DAMAGE TO EITHER OR BOTH
DEVICES OR TO YOURSELF!!!! Fear not, but read on...
In most cases, connecting a shortwave receiver to a sound card is
simple: just run a patch cord from the microphone output of the
shortwave receiver to the microphone input of the sound card.
I have an old, battery-operated Radio Shack DX-440 which I use
for wefax (yes-- it does have a mic output, albeit an undocumented
one) and this method works just fine. But what if A) your receiver
has a headphone jack, but no mic output, or B) your receiver is NOT
battery-powered and must be powered from the AC line, or C) your
receiver has neither a mic output nor a headphone jack?
Case A: headphone jack, no mic output
A sound card's mic input typically requires a signal level in the
10-20 millivolt range, but a headphone jack output can supply 1 or
more volts. Since you don't want to risk damaging your sound card,
you must reduce the level of the signal. The simplest solution is
to use a resistive voltage divider between the receiver and the
sound card; better yet, use a step-down audio transformer. For the
DX-440's headphone jack, I've found the circuit below to give
acceptable results
10000 ohm resistor
-----------
O--| |--------*-----------------O S
----------- | O
--- U
R | | N
A | | 1000 ohm D
D | | resistor
I --- C
O | A
| R
O-----------------------*-----------------O D
Case B: NOT a battery-powered receiver
If your receiver has an internal power transformer that isolates
its circuitry from the power line, it's probably OK to connect its
mic output to the sound card. If you're not sure, use an audio
transformer between the radio and the sound card. No, you can't
just use the resistive divider above. I have an old Hallicrafters
AC/DC shortwave receiver and several years ago I got an unpleasant
surprise when I absent-mindedly connected the ground lead of an
oscilloscope to the Hallicrafter's chassis (yes, I did know better,
but my brain was taking an unscheduled holiday). Spark city. Can
you say "ozone"? Please believe me: there is no better way to turn
your computer into a smoking hunk of silicon and plastic than to
apply 120 volts AC to its innards.
Case C: neither headphone jack nor mic output exists
If you're not comfortable and familiar with modifying and/or repairing
electronic equipment, get a new radio before trying to use WeatherMan.
If you possess the needed skills, you already know what to do.
I suspect most of the people who will use WeatherMan are technically
knowledgeable folks who will have absolutely no problem connecting
their radios to their sound cards. If you are in that class, let me
apologize for the simplistic admonitions. But if you are not 100%
certain you know what you're doing, find someone who does know and
ask for help before trying to use the program.
[IV] Using WeatherMan : Creating a Configuration File
Now that your radio and sound card are connected together, there's
one more thing you have to do before running WeatherMan: edit the
program's "configuration file". This file contains details about
your hardware setup and display preferences. A sample configuration
file is given below (it's a copy of the one supplied with the program
set):
1) 812 <----------------- sweep delay
2) 1050 <----------------- lowest audio frequency
3) 1800 <----------------- highest audio frequency
4) $220 <----------------- I/O port used by sound card
5) 5 <----------------- interrupt used by sound card
6) C:\CT-VOICE.DRV <---- path and name of VOC driver
7) 0 63 63 63 <- <color no.> <R> <G> <B>
8) 1 59 59 59 each RGB value must be
9) 2 55 55 55 greater than 0 and less
10) 3 50 50 50 than 63
11) 4 46 46 46
12) 5 42 42 42
13) 6 38 38 38
14) 7 34 34 34
15) 8 29 29 29
16) 9 25 25 25
17) 10 21 21 21
18) 11 17 17 17
19) 12 13 13 13
20) 13 8 8 8
21) 14 5 5 5
22) 15 0 0 0
Let's go through the list (the line numbers, e.g., "20)", are for
reference only and should not appear in the actual configuration file):
Line 1 : "sweep delay"- Since I can't think of a technical-sounding
name for this entry, I'll call it what it is: a "fudge factor".
Since Weatherman samples slightly less than a full line, the sweep
delay number is used in an empty counting loop inside the program to
ensure the received picture won't be skewed as it's being received
and displayed. How do you know what sweep delay number to use?
You don't-- you have to determine it by trial and error. Fortunately,
I can offer some guidelines:
Suppose you are receiving a fax composed of vertical lines that is
supposed to look like this:
| | |
| | |
| | |
| | |
| | |
but instead it looks like this:
\ \ \
\ \ \
\ \ \
\ \ \
\ \ \
In this case, the sweep delay number should be INCREASED.
Conversely, if the picture looks like this,
/ / /
/ / /
/ / /
/ / /
/ / /
the sweep delay number should be DECREASED.
Lines 2 and 3: "lowest audio frequency" and "highest audio frequency"--
These define the white-to-black frequency range and have two principal
uses: 1) by widening/narrowing the range, you can stretch/compress the
contrast of the received picture, and 2) by shifting the center of
the range up or down, you can possibly reduce interference caused by
transmissions on adjacent frequencies. Experiment with various
combinations to achieve the best results. The numbers given are
in cycles per second (Hz).
Line 4: Sound card I/O port- If necessary, change this number in
accordance with your particular sound card installation. Consult
your sound card's reference manual for details. Also, note that
the prefacing "$" denotes a hexadecimal number.
Line 5: Sound card interrupt number- Change if necessary, as in Line 4.
Line 6: Path and name of VOC driver- Insert the DOS path/file name
combination for your own configuration here. For example, if you
have a Sound Blaster and your driver is in directory "SB" on drive
D:, then Line 6 would read
D:\SB\CT-VOICE.DRV
If the program can't find the driver, it will stop and tell you so.
Lines 7 through 22: color palette- This is pretty self-explanatory.
The default palette is for a 16-level gray scale.
The format of the configuration file requires that comments be
separated from the file elements by at least one space and the file
should not contain any empty lines.
[V] Running WeatherMan
Once you have created a configuration file, WeatherMan is run using
the following syntax:
WXMAN
or
WXMAN <configuration file name>
If you choose the first option, "WXMAN", you must have a configuration
file with the name "WXMAN.CFG" located in the same directory as the
program file. The second option lets you choose the name and path of
a different configuration file. Suppose, for example, you have a
reversed-palette configuration file named "WXMANREV.CFG" in directory
"CONFIGS" located on drive C:. You then run the program with the
command "WXMAN C:\CONFIGS\WXMANREV.CFG".
With your shortwave receiver turned on and connected to the sound card,
activate the receiver's BFO, then tune in a wefax station. Adjust the
BFO up or down for the best picture. When tuning the BFO, it's usually
easiest to start at a high-frequency audio output and work back to the
proper frequency.
[VI] WeatherMan Keyboard Commands
Once WeatherMan is up and running, you have several commands at your
disposal
<G>rab a Picture
<C>lear Screen
<1>..<9> Delay Picture Reception
<P>osition Graphics Cursor
<H>elp
<ESC> Exit WeatherMan
<+/-> increase/decrease sweep delay
Each of the commands is activated by pressing the letter key within
the "<>" symbols. Case is unimportant.
<G>rab a picture- Pressing "G" saves the currently-displayed picture
to disk. The saved picture is time- and date-stamped
at the bottom of the screen. Saved picture files are
given the name "GRABxxx.RAW", where "xxx" denotes the
number of the saved picture. When WeatherMan starts
up, it searches the current directory for previously-
saved pictures and sets its first file name to the
next highest number to avoid overwriting old files.
<C>lear Screen- Pressing "C" clears the screen and the current
image is lost forever.
<1>..<9> Delay Picture Reception- Pressing "1" through "9" causes
sampling of the incoming fax to be
delayed an amount proportional to
the value of the selected key.
These commands let you "walk" the
true edge of the incoming fax to the
left side of the screen.
<P>osition Graphics Cursor- After positioning a picture with the "1"
through "9" keys, pressing "P" moves the
graphics cursor to the top line of the
screen, without clearing the screen.
<H>elp- Pressing "H" displays a command summary. No fax data is
received or displayed while the "H" command is in effect.
<ESC> Exit WeatherMan- Pressing the escape key unconditionally exits
the program; you are not prompted to save the picture first.
<+/-> Increase/Decrease sweep delay- use these two keys whenever
your picture is slightly skewed and you don't want to exit
and create a new configuration file.
WeatherMan's RAW picture file format is exceedingly simple, consisting
of a file of 640*480=307,200 bytes, with each byte representing a
color number in the 0 to 15 range. The file is a record of consecutive
pixel values starting at the upper left-hand side of the screen (0,0)
and extending to the lower right-hand side (639,479). This format
should make it easy for you to write your own programs for manipulating
captured picture data.
The utility program RAW2PCX.EXE (see section [VIII]) can be used to
convert the RAW format into the PCX format used by many PC
paint/image-processing programs.
[VII] The SHOWPIC program
Having saved a bunch of pictures to disk, it would be nice to see what
they looked like again, wouldn't it? That's the purpose of SHOWPIC
and its syntax is
SHOWPIC [-p] <picture file> <picture file>...
where the optional -p switch loads a palette from the file SHOWPIC.PAL.
The format of SHOWPIC.PAL is the same as in lines 7 through 22 of the
configuration file. See the sample palette file for details.
Example 1:
SHOWPIC GRAB0.RAW GRAB11.RAW GRAB2.RAW
displays the pictures GRAB0.RAW, GRAB11.RAW, and GRAB2.RAW consecutively
using the built-in gray-scale palette.
Example 2: SHOWPIC -p GRAB1.RAW TEST.RAW
displays the two given pictures using the palette contained in SHOWPIC.PAL.
You can move to the next picture in the set at any time by pressing any key.
[VIII] The RAW2PCX program
To convert a picture file to a PCX graphics file use either of the commands
RAW2PCX <input file name>, or
RAW2PCX <input file name> <output file name>
Example 1:
RAW2PCX GRAB0.RAW
This command creates a new file "GRAB0.PCX" in the PCX format.
Example 2:
RAW2PCX GRAB0.RAW TEST.PCX
Same result as in Example 1, but the output file is named "TEST.PCX"
instead.
Warning: RAW2PCX will overwrite any existing file having the same
name as the output file.
*****
[IX] WXDEMO.EXE
Wefax broadcasts have a very distinctive sound and once you've heard
one, you'll probably never forget what it sounds like; unfortunately,
the sound is difficult to describe in words. That's where the WXDEMO
program comes in.
Syntax:
WXDEMO <picture file>
WXDEMO takes a single argument, the name of a picture file, then
simulates the reception of the picture through your sound card and on
your monitor. If you've never heard a fax transmission before, WXDEMO
should help you learn what to listen for as you tune through the
shortwave bands.
[Appendix 1] Weather Facsimile Frequencies.
The following is a very small list of stations that transmit weather
photos and charts during the day. It is not at all inclusive: there
are literally dozens of other stations across the HF bands.
(All frequencies are in kilohertz.)
Frequency (KHz) Location
--------- ---------
6453 California
8682 California
9090 California
11090 Hawaii
16135 Hawaii
8080 Virginia
15959 Virginia
20015 Virginia
[Appendix 2] Troubleshooting Q&A
Q: Why isn't anything being displayed?
Make certain your radio is turned on and the BFO is activated.
Check the connection between the radio output and sound card mic
input. If you have a MediaVision PAS16 card, use the command
"PAS SET MIC TO 100" before running WeatherMan.
Q: Why does the picture look like a photo negative?
Either you have loaded a reversed palette in the configuration file
or you are tuned to the wrong sideband. Adjust the file or the BFO
accordingly.
Q: Why is the picture grainy?
The signal may be weak, or there may be a source of interference nearby,
such as an electric motor, fluorescent light, or the like. Use a good
antenna and/or increase the mic input level, and/or remove the source
of the noise.
Q: Why is the picture "ghosty"?
Just like television, if a signal is received along two or more paths
having different effective lengths, you'll get ghosts. There's no
cure, except perhaps to re-orient the receiving antenna.
Q: Why are there 30 wavy vertical lines across the picture?
You're picking up 60 Hz (power line) interference from somewhere,
possibly from a ground-fault loop. Try transformer-coupling the
receiver to the sound card and make sure you're using a good quality
shielded cable.
Q: I've set the "sweep delay" constant. Why do my pictures still come
out slightly skewed at times?
Unfortunately, a sweep delay constant that works well one day may not
work as well the next and may have to be changed. The speed at which
WeatherMan runs depends on many factors including the memory manager
you use, the kind and number of TSRs you have installed, and even the
temperature. Generally speaking, however, a sweep delay constant
which works OK at the start of a session will continue to work fine
for at least several hours. For minor corrections to the sweep delay
constant, use the "+" and "-" keys while the program is running.
Q: I get great reception until I turn on the computer. What gives?
The computer is a wonderful source of radio waves. Keep the antenna
as far as possible from the computer and connect it to your radio
with coax. The coax shield should be connected to a good ground.
Q: When my radio is on, why do I hear Skippy the Clown urging me to
do bad things?
Uh huh... That's kind of out of my area of expertise...
[Appendix 3] VOC Driver Files and Sound Cards
WeatherMan has been tested with two sound cards: Sound Blaster (v1.5) and
the Sound Blaster emulation mode of the ProAudio Spectrum 16 (PAS16).
While both cards work, the PAS16 card resulted in significantly better
performance. This is not a criticism of the Sound Blaster (I have
and use both cards), but simply a statement of fact.
Regarding VOC drivers, WeatherMan has been tested only with
CT-VOICE.DRV, version 1.0 available from Creative Labs, Inc and
with CTV-TB.DRV, a ThunderBoard driver from MediaVision, Inc.
MediaVision PAS16 owners should use the "CTV-TB.DRV" ThunderBoard
program instead of the PAS16 driver. This driver program can be
obtained from the MediaVision BBS (510-770-0968) by downloading the
file "CTV.ZIP". Incidentally, this program was found to work with
the Sound Blaster, as well.
[Appendix 4] About the Sample Pictures
The sample pictures were received using the following extremely
non-ideal setup:
Radio : Radio Shack DX-440
Sound Card : ProAudio Spectrum 16, Sound Blaster Emulation
Antenna : 25-ft. random wire antenna, located indoors
Location : Third floor of an apartment building
Problems : 1) antenna only 6 ft. from computer
2) power company transformer about 50 ft away
from computer.
Even with the setup above, I think the pictures are pretty good; I'll
leave it up to you to imagine what they might have been like using an
excellent shortwave receiver and a good antenna.
***************
Thanks for trying WeatherMan!